<?php
abstract class Core_config_abstract
{
	public static function getConfig($name)
	{
		$configClass = APP_NAME.'_config_web';
		
		if(!class_exists($configClass))
		{
			$configClass = 'Core_config_global';
		}
		
		$configConfigRef = null;
		$configRef = new ReflectionClass($configClass);
		if($configClass != 'Core_config_global') $configConfigRef = new ReflectionClass('Core_config_global');
		
		if($configRef->hasProperty($name))
		{
			$reflectionProperty = $configRef->getProperty($name);
			$reflectionProperty->setAccessible(true);
			return $reflectionProperty->getValue();
		}
		else if($configConfigRef != null && $configConfigRef->hasProperty($name))
		{
			$reflectionProperty = $configConfigRef->getProperty($name);
			$reflectionProperty->setAccessible(true);
			return $reflectionProperty->getValue();
		}
		
		return '';
	}
}